package com.mdb.open.epay.service.customer;


/*
 * Copyright (C), 2017-2019 澳发科技(MDB)
 * FileName: CustBaseInfoService.java
 * Author:
 * Date:     2019-10-28
 * History:
 * <author>          <time>          <version>          <desc>
 *          2019-10-28          V1.00             代码生成器初始生成代码
 * -----------------------------------------------------------
 * 作者姓名           修改时间           版本号            描述
 */


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mdb.bc.database.mybatisplus.SuperService;
import com.mdb.open.epay.common.MdbDataSource;
import com.mdb.open.epay.domain.po.customer.CustBaseInfo;
import com.mdb.open.epay.mapper.customer.CustBaseInfoMapper;
import org.springframework.stereotype.Service;

/**
 * 类描述：
 * 客户基本信息 服务类
 *
 * @author
 * @date 2019-10-28
 */
@Service
@DS(MdbDataSource.CUSTOMER)
public class CustBaseInfoService extends SuperService<CustBaseInfoMapper, CustBaseInfo> {

    /**
     * 根据客户编码获取客户基本信息
     *
     * @param customerCode
     * @return
     */
    public CustBaseInfo getByCustomerCode(String customerCode) {
        LambdaQueryWrapper<CustBaseInfo> queryWrapper = new LambdaQueryWrapper<>();
        return this.getOne(queryWrapper.eq(CustBaseInfo::getCustomerCode, customerCode));
    }

}
